package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Strategy;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface StrategyRepository extends MongoRepository<Strategy,String> {

	/**
	 * 指定目的地下点击率最高的三篇文章
	 * @param destId
	 * @param pageable
	 * @return
	 */
	List<Strategy> findByDestIdAndState(String destId, Pageable pageable,int state);
	/**
	 * 根据目的地名字查询攻略
	 * @param destName
	 * @return
	 */
	List<Strategy> findByDestName(String destName);
}
